package com.sskj.mine.presenter;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.bean.MineAccount;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.ui.activity.MineAccountActivity;


public class MineAccountActivityPresenter extends BasePresenter<MineAccountActivity> {
    public void getCqtf() {
        OkGo.<HttpData<MineAccount>>post(HttpConfig.BASE_URL + HttpConfig.MINE_ACCOUNT_CQTF)
                .execute(new JsonCallBack<HttpData<MineAccount>>(this, true) {
                    @Override
                    public void onSuccess(Response<HttpData<MineAccount>> response) {
                        HttpData<MineAccount> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updateUi(httpData.getData());
                        }
                    }
                });
    }
}
